
<template>
  <div class="good" :class="'good-' + row.status">
    <div class="f p1758006210 combinedShipping-hidden jcsb aic pb20 pt20" style="border-bottom: 1rpx solid #EFEFEF;">
      <div v-if="row.status == 6" class="fz30 f lh1 ">
        <div class="fw500 dib">
          <div v-if="row.CCCCCC == '待商家处理' || row.CCCCCC == '待处理即将逾期'">仅退款,商家处理中</div>
          <div v-else-if="row.CCCCCC == '待商家举证'">待商家举证</div>
          <div v-else>退货退款,商家处理中</div>
        </div>

        <div class="f aic">
          <div class="fz24   mr5 pt5 pb5 pl10 pr10  " style="color: #516AFE;height: 29rpx;background: #EEFAFF;border-radius: 4rpx;">
            <div v-if="row.BBBBBB == 1" class="dib s09">未发货</div>
            <div v-else-if="row.BBBBBB == 2" class="dib s09">运输中</div>
            <div v-else class="dib s09">已签收</div>
          </div>
          <!-- <div class="fz24 cDE0012 ml10 mr5 pt5 pb5 pl10 pr10  " style="height: 29rpx;background: #FEF2F3;border-radius: 4rpx;">
            <div class="dib s09">退货物流</div>
          </div> -->
          <uv-icon v-if="row.CCCCCC == '待处理即将逾期' || row.CCCCCC == '待举证即将逾期'" color="#DE0012" size="32rpx" name="warning-fill"></uv-icon>
        </div>
      </div>
      <div class="f aic">
        <div class="f aic jcc" style="height: 40rpx;overflow: hidden">
          <uv-avatar shape="square" :src="row.avatar" size="30rpx"></uv-avatar>
        </div>
        <div class="pl10 fz26 pr10 " style="color: #516AFE">联系 {{row.nickname}}</div>
        <div class="f aic jcc" style="height: 40rpx;overflow: hidden">
          <uv-icon color="#516AFE" size="26rpx" name="arrow-right"></uv-icon>
        </div>
      </div>
      <div v-if="row.status != 6" class="fz30">{{statusTextForm[row.status]}}</div>
    </div>
    <div style="color:#595757" class="order_no pt30 pb10 lh1 orderManagement-hidden combinedShipping-hidden">订单编号:
      <div class="pl20 dib">{{row.order_no}}</div>
    </div>
    <div class="f pt30">
      <img class="product_image" :src="row.product_image" alt="avatar">
      <div class="pl20">
        <div class="f aic lh1 jcsb ">
          <div style="" class="fz28 dib single-line lh1 pt10  product_name">{{row.product_name}}&nbsp;</div>
          <div v-if="row.status != 6" style="min-width: 100rpx;text-align: right" class="fz28 lh1 dib">¥{{row.price}}</div>
        </div>
        <div v-if="row.status != 6" class="f pt20 p1758006484 good-color aic jcsb">
          <div style="max-width: calc(100vw - 310rpx);" class="fz28 single-line">{{row.spec_values}}</div>
          <div style="min-width: 100rpx;text-align: right" class="fz28">x{{ row.cart_num }}</div>
        </div>
        <div class="p1758086903">
          <div v-if="row.status == 6" class="fz28  shipment-hidden pt15 lh1" style="min-width:50%;color:#595757">
            <div class="dib">退款金额：</div>
            <div class=" dib ">¥{{row.pay_price}}</div>
          </div>
          <div class=" shipment-hidden pt15 lh1" style="text-align: right">
            <div class="dib pay_price">实收：</div>
            <div class="fz30 pay_price dib fw500">¥{{row.pay_price}}</div>
          </div>
        </div>
        <div v-if="row.status == 6" class="fz28 pt20" style="color: #898989">“不想要不想要不想要不想要”</div>
      </div>
    </div>
    <div v-if="isObject(row.merchant_order) && row.status == 2" class=" p1758006645 good-color combinedShipping-hidden f aic jcsb pl20  pt20 pb20 mt20" style="background: #F7F8F8">
      <div class="f">
        <div class="lh1" style="width: 120rpx"> 收货信息:</div>
        <div class="lh1 pl20">
          <div class="dib"> {{row.merchant_order.address_name}} </div>
          <div class="dib pl30"> {{row.merchant_order.address_tel}} </div>
          <div class="single-line pt20 p1758007407" style="">
            <div class="dib">{{row.merchant_order.address_province}}</div>
            <div class="dib">{{row.merchant_order.address_city}}</div>
            <div class="dib">{{row.merchant_order.address_area}}</div>
            <div class="dib">{{row.merchant_order.address_town}}</div>
            <div class="dib">{{row.merchant_order.address_storey}}</div>
            <div class="dib">{{row.merchant_order.address_house_number}}</div>
          </div>
        </div>
      </div>
      <div @click.stop="handleCopy()" class="f pay_price shipment-hidden aic jcc fdc">
        <uv-icon color="#898989" size="40rpx" name="photo"></uv-icon>
        <div class="fz24 s09">复制</div>
      </div>
    </div>
    <div v-if="row.status == 3 || row.status == 4|| row.status == 7" class="  combinedShipping-hidden shipment-hidden good-color  p1758006645 f aic jcsb pl20 pr20 pt20 pb20 mt20" style="background: #F7F8F8">
      <div style="">
        <div>
          <div class="dib">中通快递</div>
          <div class="dib pl20 pr20">{{row.freight_no}}</div>
          <button @click.stop="handleCopy(row.freight_no)" class="common-button fz26 bfff pl10 pr10 " style="border: 1rpx solid #C9CACA!important;">复制</button>
        </div>
        <div class="f aic pt10">
          <div class="box" style="">
            <uv-icon color="#53B028" size="32rpx" name="checkmark-circle-fill"></uv-icon>
          </div>
          <!-- <div class="box" style="background: #dff5ce;border: 1px solid #C1E5AD;">
            <div class="p1758001873" style=""></div>
          </div> -->
          <div style="max-width: calc(100vw - 210rpx)" class="single-line pl20">您的快件离您的快件离您的快件离您的快件离您的快件离您的快件离您的快件离您的快件离您的快件离您的快件离</div>
        </div>
      </div>
      <uv-icon color="#727171" size="40rpx" name="arrow-right"></uv-icon>
    </div>
  </div>

</template>

<script>
import pageMixin from "../mixin/page.js";
import commonMixin from "../mixin/common.js";
export default {
  mixins: [commonMixin, pageMixin],
  props: {
    row: {
      type: Object,
      default: {}
    }
  },
  data() {
    return {
      statusTextForm: {
        1: '待付款',
        3: '待收货',
        4: '待评价',
        6: '退款售后',
        2: '待发货',
        7: '已完成',
      },
      adad: [
        { CCCCCC: '待商家处理', text: '商家处理中' },
        { CCCCCC: '待处理即将逾期', text: '商家处理中' },
        { CCCCCC: '待商家举证', text: '待商家举证' },
        { CCCCCC: '待举证即将逾期', text: '待商家举证' },
        { CCCCCC: '待消费者处理', text: '已驳回' },
        { CCCCCC: '待买家举证', text: '待买家举证' },
        { CCCCCC: '平台处理中', text: '平台处理中' },
        { CCCCCC: '退货待处理', text: '退货待处理', aaa:['待消费者寄出退货', '退货已寄出', '待消费者拒收', '消费者已拒收'] },
        { CCCCCC: '已售后', text: '已售后', aaa:['已发货，退款成功', '未发货，退款成功', '已撤销，退款关闭', '消费者已拒收'] },
      ]

    };

  },
  methods: {
    handleCopy(content) {
      let { address_name, address_tel, address_province, address_city, address_area, address_town, address_storey, address_house_number } = this.row.merchant_order
      content = !content ? `${address_name}  ${address_tel} \n${address_province + address_city + address_area + address_town + address_storey + address_house_number}` : content
      uni.setClipboardData({
        data: content,
        success: () => {
          uni.showToast({ title: '复制成功', icon: 'none', duration: 2000, });
        },
        fail: (err) => {
          uni.showToast({ title: err, icon: 'none', duration: 2000, });
        },
      });
    }
  },
};
</script>
<style lang="scss" scoped>
@import "../common.scss";

.p1757302241 {
  background: #ffffff;
  border-radius: 15rpx;
  box-shadow: 2rpx 2rpx 20rpx 2rpx #eeeeee;
  box-sizing: border-box;
  padding: 30rpx 20rpx;
  margin-bottom: 20rpx;
  position: relative;
}
.good {
  font-size: 28rpx;
  color: #333;
  .p1758006645 {
    font-size: 28rpx;
    padding-right: 20rpx;
  }
  .box {
    width: 32rpx;
    height: 32rpx;
    min-height: 32rpx;
    max-height: 32rpx;
    min-width: 32rpx;
    max-width: 32rpx;
    overflow: hidden;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;

    box-sizing: border-box;
  }
  .p1758001873 {
    border-radius: 50%;
    background: #53b028;
    width: 20rpx;
    height: 20rpx;
    min-height: 20rpx;
    max-height: 20rpx;
    min-width: 20rpx;
    max-width: 20rpx;
    overflow: hidden;
    box-sizing: border-box;
  }
}
.product_image {
  width: 120rpx;
  min-width: 120rpx;
  height: 120rpx;
  border: 1px solid #eeeded;
}
.good-color {
  color: #898989;
}
.p1758007407 {
  max-width: calc(100vw - 300rpx);
}
.product_name {
  max-width: calc(100vw - 310rpx);
  min-width: calc(100vw - 310rpx);
}
.good-6 {
  .product_image {
    width: 100rpx;
    min-width: 100rpx;
    height: 100rpx;
  }
  .product_name {
    max-width: calc(100vw - 190rpx);
    min-width: calc(100vw - 190rpx);
    color: #898989 !important;
  }
  .p1758086903 {
    display: flex;
    justify-content: space-between;
    .pay_price {
      color: #898989 !important;
      font-size: 28rpx !important;
      font-weight: normal !important;
    }
  }
}
</style>
